const state = {
	token: uni.getStorageSync('token'),
	profile: uni.getStorageSync('profile')
}
const mutations = {
	setToken(state, token) {
		state.token = token
		uni.setStorage({
			key: 'token',
			data: token
		})
	},
	setProfile(state, profile) {
		state.profile = profile
		uni.setStorage({
			key: 'profile',
			data: profile
		})
	}
}
const actions = {}

export default {
	namespaced: true,
	state,
	mutations,
	actions
}